namespace Cart.model
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    public partial class Goods
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public Goods()
        {
            GoodsPropertyKey = new HashSet<GoodsPropertyKey>();
        }

        [Key]
        public int gId { get; set; }

        [Required]
        [StringLength(50)]
        public string name { get; set; }

        [Required]
        [StringLength(500)]
        public string content { get; set; }

        [Required]
        [StringLength(200)]
        public string images { get; set; }

        public bool use_spec { get; set; }

        public bool use_property { get; set; }

        [Required]
        [StringLength(50)]
        public string unit { get; set; }

        [Column(TypeName = "money")]
        public decimal price { get; set; }

        public int sales { get; set; }

        public int sort { get; set; }

        public int gtId { get; set; }

        public bool on_sale { get; set; }

        public virtual GoodsType GoodsType { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<GoodsPropertyKey> GoodsPropertyKey { get; set; }
    }
}
